<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>过渡</title>
        <style>
            * {
                margin: 0;
                padding: 0;
            }
            h2 {
                background-color: orange;
                transition: 1s linear;
            }
            .go {
                transform: translateX(-100%);
            }
            .come {
                transform: translateX(0px);
            }
        </style>
    </head>
    <body>
        <h2>你好啊</h2>
    </body>
</html>